package com.ruyuan.scholartrade.controller;/**
 * @Author: XiaZhiMei
 * @Date: 2021/5/24 21:09
 */

import com.scholar.shop.common.CommonRes;
import com.scholar.shop.commons.SellerInfoOpenVO;
import com.scholar.shop.seller.login.LoginApi;
import com.scholar.shop.trad.login.BuyerLoginApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * TODO
 *
 * @author ZhiMei Xia
 * @version 1.0
 * @date 2021/5/24 21:09
 */
@RestController
@RequestMapping("/login")
public class LoginController {
    @Autowired
    private BuyerLoginApi loginApi ;
    @PostMapping
    public CommonRes<SellerInfoOpenVO> login(@RequestParam String userName,@RequestParam String password){
        return this.loginApi.login(userName,password) ;
    }
}
